using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace Daniel.Core.Models.Mapping
{
    public class TBATCHINFORMATIONMap : EntityTypeConfiguration<TBATCHINFORMATION>
    {
        public TBATCHINFORMATIONMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.BATCHID)
                .HasMaxLength(50);

            this.Property(t => t.BATCHFILETITLE)
                .HasMaxLength(400);

            this.Property(t => t.BATCHERRORDESC)
                .HasMaxLength(2000);

            this.Property(t => t.BATCHERRORITEM1)
                .HasMaxLength(200);

            this.Property(t => t.BATCHERRORITEM2)
                .HasMaxLength(200);

            this.Property(t => t.BATCHERRORITEM3)
                .HasMaxLength(200);

            // Table & Column Mappings
            this.ToTable("TBATCHINFORMATION");
            this.Property(t => t.BATCHERRORID).HasColumnName("BATCHERRORID");
            this.Property(t => t.BATCHID).HasColumnName("BATCHID");
            this.Property(t => t.BATCHFILETITLE).HasColumnName("BATCHFILETITLE");
            this.Property(t => t.BATCHWORKFLOWTASK).HasColumnName("BATCHWORKFLOWTASK");
            this.Property(t => t.BATCHERRORCLASS).HasColumnName("BATCHERRORCLASS");
            this.Property(t => t.BATCHERRORDESC).HasColumnName("BATCHERRORDESC");
            this.Property(t => t.BATCHERRORITEM1).HasColumnName("BATCHERRORITEM1");
            this.Property(t => t.BATCHERRORITEM2).HasColumnName("BATCHERRORITEM2");
            this.Property(t => t.BATCHERRORITEM3).HasColumnName("BATCHERRORITEM3");
            this.Property(t => t.ID).HasColumnName("ID");
        }
    }
}
